The OMA SyncML protocol supports the transmission of an object, when the size of the object is larger than a maximum number of bytes in a message supported by a client, the object is referred to as a large object, i.e., the size of an object to be transmitted (indicated by a Size element in a SyncML message) is larger than the maximum number of bytes in a message (indicated by a MaxMsgSize element in a SyncML message) supported by the client, then the object is a large object. For the transmission of a large object, the method specified in the OMA SyncML protocol generally includes: dividing the large object into data blocks, and transmitting the data blocks to a client by a SyncML message, wherein the size of each data block is equal to or smaller than the maximum number of bytes in a message supported by the client, and the transmission of the large object is implemented based on a basic session in the OMA SyncML protocol.
A basic session process in the OMA SyncML protocol includes two phases: session establishment and session management. The session establishment phase can be triggered by either a server or a client, and the session management is entered after a session has established between both sides. The client interacts with the server in the session management phase and completes the transmission of the large object. The way for transmitting a large object is specified in the OMA SyncML protocol.
The existing transmission process based on the OMA SyncML protocol mainly includes the following steps:
step 1: A server establishes a session with a client, and acquires a MaxMsgSize of the client;
step 2: The server transmits a large object transmission instruction, divides the large object data according to the specified MaxMsgSize, and transmits the size of the large object (indicated by a MaxMsgSize element in a SyncML message) and a first data block to the client;
step 3: The client saves the size of the large object and the first data block, and notifies the server to transmit sequentially a next data block;
step 4: The server transmits sequentially the next data block until all the data are transmitted (indicated by a Final element in a SyncML message); and
step 5: After the client receives a large object transmission completion instruction, the client combines all the data blocks, calculates the total size of all the data blocks, and compare it with the saved size of the large object, so as to check whether the large object is transmitted successfully.
It can be seen from the above flow that this transmission method has some disadvantages, i.e., it is not until all the data blocks of the large object are transmitted completely that it can be known whether the large object is transmitted successfully, therefore, even though a data block received by the client has an error, the client will not know it, instead, the client still notifies the server to transmit sequentially a next data block, which results in a waste of interaction time and bandwidth resources.